#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=1e5+5;
signed main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	int t;
	cin>>t;
	while(t--){
		int n;
		cin>>n;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=3;j++) scanf("%lld",&a[i][j]);
		}
		cout<<"0"<<'\n';
	}
	return 0;
}
